﻿<UserControl x:Class="Startup.Shell.Modules.PreviewDesignerHierarchyModule.PreviewDesignerHierarchyCtrl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:ModelDesignerPreview="clr-namespace:Startup.Shell.ModelDesignerPreview"
             xmlns:PreviewDesignerHierarchyModule="clr-namespace:Startup.Shell.Modules.PreviewDesignerHierarchyModule"
             xmlns:PreviewDesignerCtrlModule="clr-namespace:Startup.Shell.Modules.PreviewDesignerCtrlModule"
             mc:Ignorable="d" d:DataContext="{x:Static PreviewDesignerHierarchyModule:PreviewDesignerHierarchyViewModel.Designer}"
             d:DesignHeight="408" d:DesignWidth="784">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <PreviewDesignerCtrlModule:PreviewDesignerCtrlModule DataContext="{Binding Source}" Height="200" Width="200" HorizontalAlignment="Center" VerticalAlignment="Center"/>

        <ItemsControl Grid.Row="1" ItemsSource="{Binding Children}">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"/>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <PreviewDesignerHierarchyModule:PreviewDesignerHierarchyCtrl DataContext="{Binding}"/>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
        
       
    </Grid>
</UserControl>
